<template>
  <div class="col-md-3 col-lg-2 ">
            <div class="panel panel-success">
                <div class="panel-heading clearfix">
                    <span class="h2">
                        <small class="small"> 取餐号 {{item.order_num}}</small>
                    </span>
                    <hr />
                    <p>￥ {{item.price}}</p>
                    <div class="clearfix">
                        <button @click="order" class="btn btn-default pull-left">加菜</button>
                        <button @click="settle" class="btn btn-default pull-right">结账</button>
                    </div>
                </div>
            </div>
        </div>
</template>
<script>
import { openWindow } from "@/static/js/utils";
export default {
  name: "DeskItem",
  props: {
    item: Object
  },
  data() {
    return {
      name: "147"
    };
  },
  methods: {
    /**
     * 点菜
     */
    order() {
      openWindow("order.html", "点菜", {
        order_id: this.item.order_id
      });
    },
    /**
     * 结账
     */
    settle() {
      openWindow("Settlement.html", "结账", {
        order_id: this.item.order_id
      });
    }
  },
  computed: {
    state() {
      return parseInt(this.item.state);
    }
  }
};
</script>
<style>

</style>

